﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Watson.Core.Tools;
using ITOMMS.Entity;
using ITOMMS.Business;

namespace ITOMMS.Web.ReportCenter
{
    public partial class CustomerService : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.Select1.Items.FindByValue(DateTime.Now.Year.ToString()).Selected = true;

                DropDownListHelper.InitDropList<tbUserEntity>(new tbUserEntity().GetAllByQuery("RoleGroup =" + ITOMMS.Business.PubEnums.RoleGroup.客户.ToString("D")), ddl客户, "ID", "CompanyName");
                if (SessionHelper.UserRoleGroup == PubEnums.RoleGroup.客户.ToString())
                {
                    ddl客户.SelectedValue = Business.SessionHelper.UserCompanyID.ToString();
                    ddl客户.Enabled = false;
                }
            }
        }
    }
}
